package com.galaxis.wms.security.ext

import com.galaxis.wms.entity.BasLoginAgent
import com.galaxis.wms.security.utils.SecurityContextExtUtils
import com.yvan.security.SecurityContextHolder

class SecurityContextHolderExtension {
    /**
     * 获取 login_id
     */
    static Long getLoginId(SecurityContextHolder self) {
        return SecurityContextExtUtils.getLoginId()
    }

    /**
     * 获取登录代理
     */
    static BasLoginAgent getLoginAgent(SecurityContextHolder self) {
        return SecurityContextExtUtils.fillLoginAgent(SecurityContextHolder.getContext())
    }
}
